package com.devops.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.devops.admin.model.DOSEnvAndGroup;
import com.devops.admin.model.DOSProject;
import com.devops.admin.model.TableResult;
import com.devops.admin.po.DOSBindStatusProject;
import com.devops.admin.po.DOSProjectInfoPo;
import com.devops.admin.po.DOSProjectPo;
import com.devops.admin.vo.DOSPageVo;
import com.devops.admin.vo.DOSProjectVo;
import com.devops.admin.vo.DOSUpdateProjectVo;

import java.util.List;

/**
 * @ClassNem DOSProjectService
 * @Description TODO
 * @Author heyabo
 * @Date 2022/3/18 15:32
 * @Version 1.0
 **/
public interface DOSProjectService extends IService<DOSProject> {

    /**
     * @Author heyabo
     * @Description 添加项目
     * @Date 14:09 2022/3/22
     * @Param [project]
     * @return java.lang.Boolean
     **/
    Boolean addProject(DOSProject project);

    /**
     * @Author heyabo
     * @Description 根据项目的id删除项目
     * @Date 14:27 2022/3/22
     * @Param [projectId]
     * @return java.lang.Boolean
     **/
    Boolean deleteProjectById(Integer projectId);

    /**
     * @Author heyabo
     * @Description 根据名称查询项目
     * @Date 15:06 2022/3/22
     * @Param [projectVo]
     * @return com.devops.admin.model.TableResult<com.devops.admin.po.DOSProjectPo>
     **/
    TableResult<DOSProjectPo> getProjects(DOSProjectVo projectVo, DOSPageVo pageVo);


    /**
     * @Author heyabo
     * @Description 获取环境和项目组
     * @Date 11:20 2022/3/28
     * @Param []
     * @return com.devops.admin.model.DOSEnvAndGroup
     **/
    DOSEnvAndGroup getEnvAndGroup();

    /**
     * @Author heyabo
     * @Description 获取项目的详细信息
     * @Date 16:36 2022/6/9
     * @Param [projectId]
     * @return com.devops.admin.po.DOSProjectInfoPo
     **/
    DOSProjectInfoPo getProjectInfo(Integer projectId);

    /**
     * @Author heyabo
     * @Description 查询已绑定和未绑定的项目
     * @Date 08:54 2022/6/10
     * @Param []
     * @return com.devops.admin.po.DOSBindStatusProject
     **/
    List<DOSBindStatusProject> getBindProjects(Integer resourceId);

    /**
     * @Author heyabo
     * @Description 更新项目
     * @Date 16:29 2022/6/20
     * @Param [project]
     * @return java.lang.Boolean
     **/
    Boolean updateProject(DOSUpdateProjectVo project);

    /**
     * @Author heyabo
     * @Description 根据用户id查询项目
     * @Date 08:49 2022/9/9
     * @Param [projectVo]
     * @return java.util.List<com.devops.admin.po.DOSProjectPo>
     **/
    List<DOSProjectPo> getProjectsByUserId(DOSProjectVo projectVo);

}
